<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>无标题文档</title>
    <link href="/sncss/css/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="/sncss/js/jquery.js"></script>

    <script type="text/javascript">
        $(document).ready(function () {
            $(".click").click(function () {
                $(".tip").fadeIn(200);
            });

            $(".tiptop a").click(function () {
                $(".tip").fadeOut(200);
            });

            $(".sure").click(function () {
                $(".tip").fadeOut(100);
            });

            $(".cancel").click(function () {
                $(".tip").fadeOut(100);
            });

        });
    </script>


</head>


<body>

<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="#">首页</a></li>
        <li><a href="#">数据表</a></li>
        <li><a href="#">基本内容</a></li>
    </ul>
</div>

<div class="rightinfo">

    <div>

        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td>
                    <form id="form1" name="form1" method="post" action="/jzpgy.php/Home/Index/tgbz_list">

                        <input name="user" type="text" class="dfinput" id="user"/>
                        <input name="" type="submit" class="btn" value="确认搜索"/>
                    </form>



                </td>
                <td>
                    <form action="{:U('index/tgbz_topage')}" name="form1" method="post">
                        &nbsp;&nbsp;&nbsp;  跳转页
                        <input name="page" type="text" class="dfinput" id="user" style="width: 100px;"/>
                        <input name="" type="submit" class="btn" value="确定"/>
                    </form>
                </td>
                <td align="right"><a href="/jzpgy.php/Home/Index/tgbz_list/cz/0/">未匹配</a> <a
                        href="/jzpgy.php/Home/Index/tgbz_list/cz/1/">已匹配</a> <a
                        onClick="javascript:if(!confirm('1-1自动匹配前请先备份备据,未备份请点取消,点确定自动匹配所有订单!'))  return  false; "
                        href="/jzpgy.php/Home/Index/zdpp_cl">所有订单自己动匹配</a></td>
            </tr>
            <tr>
                <td>总充值:{$z_jgbz} 交易成功:{$z_jgbz2} 交易中:{$z_jgbz3} 可匹配金额:{$z_jgbz4}</td>
                <td></td>
                <td align="right">&nbsp;</td>
            </tr>
        </table>


    </div>


    <table class="tablelist">
        <thead>
        <tr>
            <th>编号<i class="sort"><img src="/sncss/images/px.gif"/></i></th>
            <th>提供会员</th>
            <th>支付方式</th>
            <th>提供金额</th>
            <th>状态</th>
            <th>确认状态</th>
            <th>提供昵称</th>
            <th>提供时间</th>
            <th>当期处理</th>
        </tr>
        </thead>
        <tbody>

        <foreach name='list' item='v'>
            <tr>
                <td>{$v.id} <a onClick="javascript:if(!confirm('确认要删除吗？'))  return  false; "
                               href="/jzpgy.php/Home/Index/tgbz_list_del/id/{$v.id}">删除</a></td>
                <td>{$v.user}</td>
                <td>
                    <if condition="$v.zffs1 eq 1">银行</if>
                    <if condition="$v.zffs2 eq 1">支付宝</if>
                    <if condition="$v.zffs3 eq 1">微信</if>
                </td>
                <td>{$v.jb}</td>
                <td>
                    <if condition="$v.zt eq 0">等待中</if>
                    <if condition="$v.zt eq 1">匹配成功</if>
                </td>

                <td>

                    <if condition="$v.qr_zt eq 0">未确认</if>
                    <if condition="$v.qr_zt eq 1">已确认</if>
                </td>
                <td>{$v.user_nc}</td>
                <td>{$v.date}</td>
                <td>
                    <!--<a href="/jzpgy.php/Home/Index/tgbz_list_sd/id/{$v.id}/">手动匹配</a>-->

                    <a href="#" onclick="setProperty(this,{$v.id})">
                        <if condition="$v.tg_status eq 0">
                            <font color='red'>否</font>
                        </if>
                        <if condition="$v.tg_status eq 1">
                            <font color='blue'>是</font>
                        </if>
                    </a>

                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
    <table>
        <tr>
            <td>
                <form method="post" action="{:U('Matching/yh')}" style="margin-right: 10px;">
                    <input name="sub" type="submit" class="btn" value="数据优化"/>
                </form>
            </td>
            <td>
                <form method="post" action="{:U('Matching/wallert_settlement')}" style="margin-right: 10px;">
                    <input name="sub" type="submit" class="btn" value="钱包结算"/>
                </form>
            </td>
            <td>
                <form method="post" action="{:U('Matching/setmatch')}" style="margin-right: 10px;">
                    <input name="sub" type="submit" class="btn" value="当期处理"/>
                </form>
            </td>
            <td>
                <form method="post" action="{:U('Matching/domatch')}">
                    <input name="sub" type="submit" class="btn" value="自动匹配"/>
                </form>
            </td>
            <td>&nbsp</td>
            <td>&nbsp</td>
        </tr>
    </table>

    <script type="text/javascript">
        function setProperty(obj, id) {
            if ($(obj).children("font").html() == "否")
                if (!confirm('参加匹配？')) return false;
            if ($(obj).children("font").html() == "是")
                if (!confirm('不参加匹配？')) return false;
            $.ajax({
                type: "POST",
                url: "{:U('Index/tg_setstatus')}",
                data: 'id=' + id,
                dataType: "JSON",
                success: function(msg) {
                    if (msg == 1) {
                        $(obj).children("font").html('否');
                        $(obj).children("font").css('color', 'red');
                    }
                    else{
                        $(obj).children("font").html('是');
                        $(obj).children("font").css('color', 'blue');
                    }

                },
                error: function(XMLHttpRequest, textStatus, errorThrown) {
                    alert('服务器获取出错' + id);
                }
            })
        }
    </script>
    <style>.pages a, .pages span {
        display: inline-block;
        padding: 2px 5px;
        margin: 0 1px;
        border: 1px solid #f0f0f0;
        -webkit-border-radius: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
    }

    .pages a, .pages li {
        display: inline-block;
        list-style: none;
        text-decoration: none;
        color: #58A0D3;
    }

    .pages a.first, .pages a.prev, .pages a.next, .pages a.end {
        margin: 0;
    }

    .pages a:hover {
        border-color: #50A8E6;
    }

    .pages span.current {
        background: #50A8E6;
        color: #FFF;
        font-weight: 700;
        border-color: #50A8E6;
    }</style>

    <div class="pages"><br/>

        <div align="right">{$page}
        </div>
    </div>


    <div class="tip">
        <div class="tiptop"><span>提示信息</span><a></a></div>

        <div class="tipinfo">
            <span><img src="images/ticon.png"/></span>
            <div class="tipright">
                <p>是否确认对信息的修改 ？</p>
                <cite>如果是请点击确定按钮 ，否则请点取消。</cite>
            </div>
        </div>

        <div class="tipbtn">
            <input name="" type="button" class="sure" value="确定"/>&nbsp;
            <input name="" type="button" class="cancel" value="取消"/>
        </div>

    </div>


</div>

<script type="text/javascript">
    $('.tablelist tbody tr:odd').addClass('odd');
</script>

</body>

</html>
